/** @file pegasos_svm_main.cc
 *
 *  @author Dongryeol Lee (drselee@gmail.com)
 */

#include "mlpack/svm/pegasos.h"
#include "mlpack/svm/svm_arguments.h"
#include "mlpack/svm/svm_model.h"
#include "mlpack/svm/svm_result.h"

int main(int argc, char *argv[]) {

  // Initialize boost MPI.
  boost::mpi::environment env(argc, argv);
  boost::mpi::communicator world;

  // Parse the arguments.
  mlpack::svm::SVMArguments svm_arguments;
  if(svm_arguments.Parse(world, argc, argv)) {
    return 0;
  }

  // Run the driver.
  mlpack::svm::SVMResult svm_result;
  mlpack::svm::SVMModel svm_model;
  mlpack::svm::Pegasos::Train(&svm_arguments, &svm_result, &svm_model);

  return 0;
}
